package models

import (
	"gin-app/app/common"
)

type Book struct {
	common.ID
	BookName string `json:"book_name" gorm:"not null;comment:书籍名称"`
	UserID   string `json:"user_id" gorm:"not null;comment:用户id"`
	common.Timestamps
	common.SoftDeletes
}

func NewBook(bookName, userId string) *Book {
	return &Book{
		UserID:   userId,
		BookName: bookName,
	}
}
